package com.yc.framework.baseClass;

import java.util.Date;

import com.baomidou.mybatisplus.annotation.IdType;
import com.baomidou.mybatisplus.annotation.TableField;
import com.baomidou.mybatisplus.annotation.TableId;
import com.baomidou.mybatisplus.annotation.TableLogic;
import com.baomidou.mybatisplus.extension.activerecord.Model;

import lombok.Data;

/**
 * FileName: BaseEntity Description:
 */
@Data
public class BaseEntity<M extends Model<?>> extends Model<M> {


	private static final long serialVersionUID = 1L;

	/**
	 * 当前页码，默认为1
	 */
	@TableField(exist = false)
	private Long pageNum = 1L;

	/**
	 * 每页条数，默认为10
	 */
	@TableField(exist = false)
	private Long pageSize = 10L;

	/**
	 * 主键ID
	 */
	@TableField("id")
//	@TableId(type = IdType.AUTO)
	//@ExcelField("序号")
	private Integer id;

	/**
	 * 创建时间
	 */
	@TableField("create_time")
	private Date createTime;

	/**
	 * 是否删除
	 */
	@TableField("deleted")
	@TableLogic //逻辑删除
	private Boolean deleted;

}
